package cc.autoapi.pucong.auto.flow.provider.log.entity;

import cc.autoapi.pucong.auto.flow.persistence.po.log.ApiInstancePo;
import cc.autoapi.pucong.auto.flow.provider.log.entity.vo.ApiInstanceDetailVo;
import cc.autoapi.pucong.auto.flow.provider.log.entity.vo.ApiInstanceVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author pucong
 * @description 项目api实例 cover
 * @create 2024-10-07
 */
@Mapper(componentModel = "spring")
public interface ApiInstanceConvert {

    ApiInstanceConvert INSTANCE = Mappers.getMapper(ApiInstanceConvert.class);

    /**
     * list<po>转list<vo>
     *
     * @param apiInstances
     * @return
     */
    List<ApiInstanceVo> po2vos(List<ApiInstancePo> apiInstances);

    ApiInstanceDetailVo po2Detailvo(ApiInstancePo apiInstance);
}
